package com.smart.car.record;

import com.smart.car.record.config.DataSourceProxyAutoConfiguration;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.messaging.Source;
import org.springframework.context.annotation.Import;


@EnableFeignClients(basePackages = "com.smart.car.record.client")
@Slf4j
@EnableDiscoveryClient
@Import({DataSourceProxyAutoConfiguration.class})
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableBinding(Source.class) //这里采用自定义的消息收发接口
public class SmartcarRecordApplication {

    public static void main(String[] args) {
        SpringApplication.run(SmartcarRecordApplication.class, args);
        log.info("Record 记录服务正在运行!");
    }

}
